package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.MgtGoodPeopleThingsMapper;
import com.ruoyi.bussiness.domain.MgtGoodPeopleThings;
import com.ruoyi.bussiness.service.IMgtGoodPeopleThingsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 好人好事Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class MgtGoodPeopleThingsServiceImpl implements IMgtGoodPeopleThingsService 
{
    @Autowired
    private MgtGoodPeopleThingsMapper mgtGoodPeopleThingsMapper;

    /**
     * 查询好人好事
     * 
     * @param id 好人好事主键
     * @return 好人好事
     */
    @Override
    public MgtGoodPeopleThings selectMgtGoodPeopleThingsById(Long id)
    {
        return mgtGoodPeopleThingsMapper.selectMgtGoodPeopleThingsById(id);
    }

    /**
     * 查询好人好事列表
     * 
     * @param mgtGoodPeopleThings 好人好事
     * @return 好人好事
     */
    @Override
    public List<MgtGoodPeopleThings> selectMgtGoodPeopleThingsList(MgtGoodPeopleThings mgtGoodPeopleThings)
    {
        return mgtGoodPeopleThingsMapper.selectMgtGoodPeopleThingsList(mgtGoodPeopleThings);
    }

    /**
     * 新增好人好事
     * 
     * @param mgtGoodPeopleThings 好人好事
     * @return 结果
     */
    @Override
    public int insertMgtGoodPeopleThings(MgtGoodPeopleThings mgtGoodPeopleThings)
    {
        return mgtGoodPeopleThingsMapper.insertMgtGoodPeopleThings(mgtGoodPeopleThings);
    }

    /**
     * 修改好人好事
     * 
     * @param mgtGoodPeopleThings 好人好事
     * @return 结果
     */
    @Override
    public int updateMgtGoodPeopleThings(MgtGoodPeopleThings mgtGoodPeopleThings)
    {
        return mgtGoodPeopleThingsMapper.updateMgtGoodPeopleThings(mgtGoodPeopleThings);
    }

    /**
     * 批量删除好人好事
     * 
     * @param ids 需要删除的好人好事主键
     * @return 结果
     */
    @Override
    public int deleteMgtGoodPeopleThingsByIds(String ids)
    {
        return mgtGoodPeopleThingsMapper.deleteMgtGoodPeopleThingsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除好人好事信息
     * 
     * @param id 好人好事主键
     * @return 结果
     */
    @Override
    public int deleteMgtGoodPeopleThingsById(Long id)
    {
        return mgtGoodPeopleThingsMapper.deleteMgtGoodPeopleThingsById(id);
    }
}
